/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.pay.i;

import android.os.Bundle;
import android.telephony.SmsManager;
import android.text.TextUtils;
import com.qihoo.gamecenter.sdk.pay.k.c;

public class a {
    private String a = a(paramBundle, "fee_type", "12");
    private String b;
    private String c;
    private String d;
    private String e;
    private String f;
    private String g;
    private String h;

    public a(Bundle paramBundle) {
        this.b = paramBundle.getString("cp_id");
        this.c = paramBundle.getString("cp_serviceid");
        this.d = paramBundle.getString("consumer_code");
        this.e = a(paramBundle, "fid", "1000");
        this.f = a(paramBundle, "package_id", "000000000000");
        this.g = a(paramBundle, "cp_sign", "000000");
    }

    private String a(Bundle paramBundle, String paramString1, String paramString2) {
        String str = paramBundle.getString(paramString1);
        return ((TextUtils.isEmpty(str)) ? paramString2 : str);
    }

    public void a(String paramString) {
        this.h = paramString;
    }

    public boolean a() {
        if (a(this.b, 6))
            return false;
        if (a(this.c, 12))
            return false;
        return (!(a(this.d, 12)));
    }

    public String b() {
        if (!(e()))
            return null;
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append(this.a).append(this.b).append(this.c).append(this.d);
        localStringBuilder.append(this.e).append(this.f).append(this.g).append(this.h);
        c.a("CmccSms", new Object[] { "getPaySmsMsg=", localStringBuilder.toString() });
        return localStringBuilder.toString();
    }

    public String c() {
        StringBuilder localStringBuilder = new StringBuilder();
        localStringBuilder.append(this.b).append(this.c).append(this.d);
        c.a("CmccSms", new Object[] { "getPayInfo1=", localStringBuilder.toString() });
        return localStringBuilder.toString();
    }

    public void d() {
        String str = b();
        if (TextUtils.isEmpty(str))
            return;
        SmsManager.getDefault().sendTextMessage("106588992", null, str, null, null);
    }

    private boolean e() {
        if (a(this.a, 2))
            return false;
        if (!(a()))
            return false;
        if (a(this.e, 4))
            return false;
        if (a(this.f, 12))
            return false;
        if (a(this.g, 6))
            return false;
        return (!(a(this.h, 16)));
    }

    private boolean a(String paramString, int paramInt) {
        return ((paramString == null) || (paramString.length() != paramInt));
    }
}